package ui.listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import ui.panel.AzubiPanel;
import ui.panel.BetriebPanel;

public class AzubiListener implements ActionListener 
{
	private AzubiPanel panel;
	
	public AzubiListener(AzubiPanel panel) {
		this.panel = panel;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) 
	{
		String action_command = e.getActionCommand();
		
		if(action_command.equals("erstellen"))
		{
			this.panel.add();
		}
		else if(action_command.equals("loeschen")) {
			this.panel.remove();
		} else if(action_command.equals("klassen")) {
			this.panel.klasseZuordnen();
		}
		
	}

}
